//package com.verify.verifyalism2.controller;
//
//
//import cn.tass.SRJ1933.devices.constant.TACryptConst;
//import cn.tass.SRJ1933.devices.inf.TassSignServerApi;
//import cn.tass.SRJ1933.devices.params.response.p7Envelop.DecryptP7EnvelopResponse;
//import cn.tass.SRJ1933.devices.params.response.p7Envelop.DecryptP7SignedAndEnvelopResponse;
//import cn.tass.SRJ1933.devices.params.response.p7Envelop.P7EnvelopExternalResponse;
//import cn.tass.SRJ1933.devices.params.response.p7Envelop.P7SignedAndEnvelopResponse;
//import cn.tass.SRJ1933.devices.params.response.p7Sign.P7SignResponse;
//import cn.tass.SRJ1933.devices.params.response.p7Sign.VerifyP7SignResponse;
//import cn.tass.exceptions.TAException;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController()
//public class TestNewSdk {
//
//    private static TassSignServerApi signServerApi;
//
//    private static String printFormat = "错误码[%d]\n错误消息[%s]\n接口结果： %s";
//
//    /**
//     * 类加载的时候，只需要初始化一次即可，且可以一直使用，没有时效限制
//     */
//    static {
//        System.out.println("*********** 设备开始初始化... *********** ");
//        try {
//            String config =
//                    "{"
//                            + "[LOGGER];"
//                            + "logsw=error;logPath=./;"
//                            + "[HOST1];"
//                            + "hsmModel=SVSM;"
//                            + "host=172.16.13.37;"
//                            + "port=9081;"
//                            + "linkNum=-10;"
//                            + "sysname=aly-zcjk;"
//                            + "signkey=;"
//                            + "}";
//            signServerApi = TassSignServerApi.init(config);
//            if (null == signServerApi) {
//                // 初始化失败
//                System.err.println("初始化失败....");
//            }
//            System.out.println("*********** 设备初始化完成... *********** ");
//            System.out.println("*********** 请选择测试项... *********** ");
//        } catch (TAException e) {
//            System.err.println("初始化失败...");
//            e.printStackTrace();
//        }
//    }
//
//
//    @GetMapping("/verifyJD")
//    public void verifyJD() throws TAException {
//
////        initDevice();
//
//        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~进入了京东方法验证~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
//        //加签
//        System.out.println("*********************************开始加签*********************************");
//        String keyId0 = "aly-zcjk";
//        int keyIdType0 = 0;
//        String keyAccessCode0 = "";
//        String algorithm0 = TACryptConst.TA_S_ALG_SM3WITHSM2;
//        String data0 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        int dataType0 = 0;
//        boolean isDetach0 = true;
//        String sm2UserID0 = "";
//        boolean isReturnCertInfo0 = true;
//        int infoType0 = 1;
//        int signCertType0 = 0;
//        P7SignResponse p7SignResponse = signServerApi.p7Sign(keyId0, keyIdType0, keyAccessCode0, sm2UserID0, algorithm0, data0, dataType0, isDetach0, isReturnCertInfo0, infoType0, signCertType0);
//        System.out.println("p7签名(内部密钥)：" + String.format(printFormat, p7SignResponse.getCode(), p7SignResponse.getMsg(), p7SignResponse.toString()));
//        System.out.println("-----------------------------------加签完成-----------------------------------");
//        System.out.println();
//        System.out.println();
//
//        //加密
//        System.out.println("*********************************开始加密*********************************");
//        //京东导入服务器对应的公钥证书
//        String cert1 = "MIIC4zCCAoegAwIBAgIFEFCAdlkwDAYIKoEcz1UBg3UFADBcMQswCQYDVQQGEwJDTjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRswGQYDVQQDDBJDRkNBIFRFU1QgU00yIE9DQTEwHhcNMjIwNzI4MDg1MDIzWhcNMjIxMDI4MDg1MDIzWjCBmjELMAkGA1UEBhMCY24xFjAUBgNVBAoMDUNGQ0EgT0NBMSBTTTIxFjAUBgNVBAsMDUxvY2FsIFJBIE9DQTExFDASBgNVBAsMC0VudGVycHJpc2VzMUUwQwYDVQQDDDwwNDFAWjEyMzQ1NkDkuK3lgqjkuqznp5HkvpvlupTpk77nrqHnkIbmnInpmZDlhazlj7hAMDAwMDAwMDEwWTATBgcqhkjOPQIBBggqgRzPVQGCLQNCAARyka46wRI7K6kdWwh9EhjPI5Fua3oeVPUrokvU2x+Wnc4R8DOk+as4bau2nONEmjIudIULyt0p7nmXjqeDilIto4H0MIHxMB8GA1UdIwQYMBaAFGv+GNqPQjqmuG2zLoiDOjSiwTDhMEgGA1UdIARBMD8wPQYIYIEchu8qAQEwMTAvBggrBgEFBQcCARYjaHR0cDovL3d3dy5jZmNhLmNvbS5jbi91cy91cy0xNC5odG0wOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL3VjcmwuY2ZjYS5jb20uY24vU00yL2NybDM3NDM2LmNybDALBgNVHQ8EBAMCA+gwHQYDVR0OBBYEFMCtw8t4uUClhClNd5QS9oljMEGLMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAMBggqgRzPVQGDdQUAA0gAMEUCIDU6AV7KWua1xkKFcs2OEzAx4bD6TuVmaGuh0mh4eMsqAiEApNd8JBSG/t5YcbmQRATBLOC+r6dSH9Bbz+fMSf3esU0=";
//        String encAlgorithm1 = TACryptConst.GBSMS4_CBC;
//        String data1 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        boolean isReturnCertInfo1 = true;
//        int infoType1 = 0;
//        P7EnvelopExternalResponse p7EnvelopExternalResponse = signServerApi.p7EnvelopExternal(cert1, encAlgorithm1, data1, isReturnCertInfo1, infoType1);
//        System.out.println("外部证书制作p7信封：" + String.format(printFormat, p7EnvelopExternalResponse.getCode(), p7EnvelopExternalResponse.getMsg(), p7EnvelopExternalResponse.toString()));
//        System.out.println("-----------------------------------加密完成-----------------------------------");
//        System.out.println();
//        System.out.println();
//
//
//        //生成带签名的数字信封--内部加签，外部公钥证书加密
//        System.out.println("*********************************开始生成带签名的数字信封*********************************");
//        String signKeyId2 = "aly-zcjk";
//        int signKeyIdType2 = 0;
//        String signKeyAccessCode2 = "";
//        String signAlgorithm2 = TACryptConst.TA_S_ALG_SM3WITHSM2;
//        String encAlgorithm2 = TACryptConst.GBSMS4_CBC;
//        String data2 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        String sm2UserID2 = "";
//        String encCert2 = "MIIC4zCCAoegAwIBAgIFEFCAdlkwDAYIKoEcz1UBg3UFADBcMQswCQYDVQQGEwJDTjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRswGQYDVQQDDBJDRkNBIFRFU1QgU00yIE9DQTEwHhcNMjIwNzI4MDg1MDIzWhcNMjIxMDI4MDg1MDIzWjCBmjELMAkGA1UEBhMCY24xFjAUBgNVBAoMDUNGQ0EgT0NBMSBTTTIxFjAUBgNVBAsMDUxvY2FsIFJBIE9DQTExFDASBgNVBAsMC0VudGVycHJpc2VzMUUwQwYDVQQDDDwwNDFAWjEyMzQ1NkDkuK3lgqjkuqznp5HkvpvlupTpk77nrqHnkIbmnInpmZDlhazlj7hAMDAwMDAwMDEwWTATBgcqhkjOPQIBBggqgRzPVQGCLQNCAARyka46wRI7K6kdWwh9EhjPI5Fua3oeVPUrokvU2x+Wnc4R8DOk+as4bau2nONEmjIudIULyt0p7nmXjqeDilIto4H0MIHxMB8GA1UdIwQYMBaAFGv+GNqPQjqmuG2zLoiDOjSiwTDhMEgGA1UdIARBMD8wPQYIYIEchu8qAQEwMTAvBggrBgEFBQcCARYjaHR0cDovL3d3dy5jZmNhLmNvbS5jbi91cy91cy0xNC5odG0wOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL3VjcmwuY2ZjYS5jb20uY24vU00yL2NybDM3NDM2LmNybDALBgNVHQ8EBAMCA+gwHQYDVR0OBBYEFMCtw8t4uUClhClNd5QS9oljMEGLMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAMBggqgRzPVQGDdQUAA0gAMEUCIDU6AV7KWua1xkKFcs2OEzAx4bD6TuVmaGuh0mh4eMsqAiEApNd8JBSG/t5YcbmQRATBLOC+r6dSH9Bbz+fMSf3esU0=";
//        boolean isAttachSign2 = true;
//        int attachSignFormat2 = 0;
//        boolean isReturnCertInfo2 = true;
//        int infoType2 = 1;
//        P7SignedAndEnvelopResponse p7SignedAndEnvelopResponse = signServerApi.p7CreateSignedAndEnvelop(signKeyId2, signKeyIdType2, signKeyAccessCode2, signAlgorithm2, encCert2, encAlgorithm2, data2, sm2UserID2,
//                isAttachSign2, attachSignFormat2, isReturnCertInfo2, infoType2);
//        System.out.println("编制p7带签名的数字证书 - 签名使用内部密钥，加密使用外部证书：" + String.format(printFormat, p7SignedAndEnvelopResponse.getCode(), p7SignedAndEnvelopResponse.getMsg(), p7SignedAndEnvelopResponse.toString()));
//        System.out.println("*********************************生成带签名的数字信封结束*********************************");
//        System.out.println();
//        System.out.println();
//
//
//
//
//
//
//        //验签
//        System.out.println("*********************************开始验签*********************************");
//        String data3 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        int dataType3 = 0;
//        String sign3 = "MIID9QYKKoEcz1UGAQQCAqCCA+UwggPhAgEBMQ4wDAYIKoEcz1UBgxEFADAMBgoqgRzPVQYBBAIBoIIC5zCCAuMwggKHoAMCAQICBRBQgHZZMAwGCCqBHM9VAYN1BQAwXDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEbMBkGA1UEAwwSQ0ZDQSBURVNUIFNNMiBPQ0ExMB4XDTIyMDcyODA4NTAyM1oXDTIyMTAyODA4NTAyM1owgZoxCzAJBgNVBAYTAmNuMRYwFAYDVQQKDA1DRkNBIE9DQTEgU00yMRYwFAYDVQQLDA1Mb2Nh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Response verifyP7SignResponse = signServerApi.verifyP7Sign(data3, dataType3, sign3, isDetach3, isReturnCertInfo3, infoType3);
//        System.out.println("验证p7签名：" + String.format(printFormat, verifyP7SignResponse.getCode(), verifyP7SignResponse.getMsg(), verifyP7SignResponse.toString()));
//        System.out.println("-----------------------------------验签完成-----------------------------------");
//        System.out.println();
//        System.out.println();
//
//
//
//        //解密：不带签名的
//        System.out.println("*********************************开始解密-不带签名的*********************************");
//        String keyId4 = "aly-zcjk";
//        int keyIdType4 = 0;
//        String keyAccessCode4 = "";
//        boolean isReturnCertInfo4 = true;
//        int infoType4 = 0;
//        String envelop4 = "MIIBkAYKKoEcz1UGAQQCA6CCAYAwggF8AgEAMYH5MIH2AgEAMGUwXDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEbMBkGA1UEAwwSQ0ZDQSBURVNUIFNNMiBPQ0ExAgUQUZUYMDANBgkqgRzPVQGCLQMFAAR7MHkCIQCsyIZZzPSJit/w+orgK+Y2tLhGFPXzWmK6OsEPjukG+QIgYshW1ukkGPjmxMdMP0kdQwSV6CnjjOTywzuFTpo/rvYEIPUfaNwvOr+8BjZnbKXu+2ygZlpUHgdcnG4sJ+PAn6dEBBDjpjwOvqb7Cu0kQ7vu+jeAMHsGCiqBHM9VBgEEAgEwGwYHKoEcz1UBaAQQg3oNTqkf/acICXEaOgNB4oBQ6RCaqDm5AACHXRNCJbtb/RSxATWkAiEQLxG4ZdlySdBoswk+wAvqmrh1V+M65Qxw957VA/jKY95ItWFD7T/k9znlq5gWnDTvVpeojRnuUXQ=";
//        DecryptP7EnvelopResponse decryptP7EnvelopResponse = signServerApi.decryptP7Envelop(keyId4, keyIdType4, keyAccessCode4, envelop4, isReturnCertInfo4, infoType4);
//        System.out.println("解密p7数字信封：" + String.format(printFormat, decryptP7EnvelopResponse.getCode(), decryptP7EnvelopResponse.getMsg(), decryptP7EnvelopResponse.toString()));
//        System.out.println("-----------------------------------解密完成-不带签名的-----------------------------------");
//        System.out.println();
//        System.out.println();
//
//
//
//
//        //解密：带签名的
//        System.out.println("*********************************开始解密-带签名的*********************************");
//        String keyId5 = "aly-zcjk";
//        int keyIdType5 = 0;
//        String keyAccessCode5 = "";
//        String envelop5 = "MIIFlAYKKoEcz1UGAQQCA6CCBYQwggWAAgEAMYH5MIH2AgEAMGUwXDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEbMBkGA1UEAwwSQ0ZDQSBURVNUIFNNMiBPQ0ExAgUQUZUYMDANBgkqgRzPVQGCLQMFAAR7MHkCIALCd2BixsZjzJaQy1+7z2GzZai6Rswge5pvrmPZdJHXAiEA3zD4HPOcCanDda60bxtDj4wP0Ps/PcPj47a1Hb8SzTgEIBt+umnzUf/rDF2vUEZhF97YC6UaxsoIGzV+aeISsZr4BBCQ2jN68bXz99yX7vePOvUbMIIEfQYKKoEcz1UGAQQCATAbBgcqgRzPVQFoBBD2PUaIVlqR2Z8giRF9GqUJgIIEUE8RlG+0zjdGv4nPZkj1AzJ9/Fnhi9b4dK9XRiqJpdW5xHcfPMo9jjITvTmTpuaq0eKiRNcMAqSwCBqL2H9fSia4GUMgFdoW2YEyhXCBSahUVVxEff2ZQLEoILivxbALDqVCKAQ4MmZ5Uc9to1UK1Wahvf/9Rn2bhAEZPQvyYZeIulNS72fiXE2KwGq9S/rgeJ0uW3O9nb14n3snaZLOmcCQvc7CrWeAgh5Xx7h2Xt1IhX7YC23uWXxqeAQODH+ToQCNEICnWyU4tTmGy0gxYBUvow/lrVmF0fj5H0v9sHLv4jaQlD1Ljrr8Tmpy9MQKEgtKQlVrjXyOyaWPB0s9KeQBf1qUbVnhHdYHqqLsy96c4X9w+I20M3bA5Ykcspnfs6f8zdMeXtX6LpJQSdiC+7AXHVwoPR+W8E8NiSMf7gvOqUI7AcJJMJ9VGzX2EtH/soe7CiDLcGcLh+titdx5TFGKavSZ+nhqTHbziI3ivujl8UNCgs8PhjeI3Zta95FH5QAJ2m9M2Ul0Dy2Kqopd4mgLxmul9cWrNhTFAqqe++J+I94nI0yRP+8nibCEbs1PCVl6YngTZUbl7euWjUmXTBvUvVpuT8xckDJOL3uOSCc6i0sMC98dKEgQK4v/TiNi0iC9ZYZ+ikBtJ9AMb3F5NoAs3nb3RB04N88m3OcLaL7kW2W8nhiy767ctR8LHrCq/fq00QwThFBFHIkDCc5LcMr2YqEklid/wtOgVw8xJ1hYs0iuDufNJ1qwA3qHWG3gis3o67SsHTP7AR14aQDtMhezip10kPRhLaexMRhP7y/4OgKD2L6iAYkbXM6XKrxaaEIjvxgwxTj5XJ156qc9qRsE3RzsdqBUuEGlhaIQSB/0ouQnKvlE9LESKbMbYYbQujb8osxz5OiqLSRpt19oId3hdUbkCVuoEetlhcEO4TBXYjO+MedBkdOL4gbAPtmcWZjZcLtbFVQkxPuKF6Y/Lzuc9WMoriZ5qZ6f//nuN815LBUsMomKEUy0sgmz8w+CuQ0xz7kEDBExuYx+ImJ4vdfBID8nXI4cFWvGCR44P95JY8FpPSbare8eYNdRsZCPyYBsplwlP3NZ2XjqZNFVDompgUrX/zu5YuJie3Qpz6FE5a2i5+X3BFY8iaxjwhyUHeNlXNEZHuHWoYYfUtIODbylwEilf/q18baaEMaS0VSlCQV8dl7YPzpU0ML2VdScjTjJWf2zEg7q33AhDgLZ8ymRfpPnaecSCW0ZimXnpAsEKXsv38q6l3lzVWNW7olBha5SRsM1GyTd5T7wWFuQd8axRPyp0EYDJMtLlNWLIFJiGQsu7mTDjyMwLG9hFg0Y4nRCc9vUMqga9ywURW6YvUotjbizdHkNRggt4wu0ZrledYPaWbTgZdCY+bQwexh4zdhchlDhQqav2ifltcT9Xok3tay8JI/DktJVZf0e9S1PyHAZDhBciruqNnE1HpxCiQ==";
//        String sm2UserID5= "";
//        int verifyLevel5 = 0;
//        boolean isReturnCert5 = true;
//        boolean isAttachSign5 = true;
//        int attachSignFormat5 = 0;
//        boolean isReturnCertInfo5 = true;
//        int infoType5 = 0;
//        DecryptP7SignedAndEnvelopResponse decryptP7SignedAndEnvelopResponse = signServerApi.decryptP7SignedAndEnvelop(keyId5, keyIdType5, keyAccessCode5, envelop5, sm2UserID5, verifyLevel5, isReturnCert5,
//                isAttachSign5, attachSignFormat5, isReturnCertInfo5, infoType5);
//        System.out.println("解密P7带签名数字信封 - 内部非对称解密：" + String.format(printFormat, decryptP7SignedAndEnvelopResponse.getCode(), decryptP7SignedAndEnvelopResponse.getMsg(), decryptP7SignedAndEnvelopResponse.toString()));
//        System.out.println("-----------------------------------解密完成-带签名的-----------------------------------");
//        System.out.println();
//        System.out.println();
//    }
//
//    /*private void initDevice() {
//        System.out.println("*********** 设备开始初始化... *********** ");
//        try {
//            String config =
//                    "{"
//                            + "[LOGGER];"
//                            + "logsw=error;logPath=./;"
//                            + "[HOST1];"
//                            + "hsmModel=SVSM;"
//                            + "host=172.16.13.37;"
//                            + "port=9081;"
//                            + "linkNum=-10;"
//                            + "sysname=aly-zcjk;"
//                            + "signkey=;"
//                            + "}";
//            signServerApi = TassSignServerApi.init(config);
//            if (null == signServerApi) {
//                // 初始化失败
//                System.err.println("初始化失败....");
//            }
//            System.out.println("*********** 设备初始化完成... *********** ");
//            System.out.println("*********** 请选择测试项... *********** ");
//        } catch (TAException e) {
//            System.err.println("初始化失败...");
//            e.printStackTrace();
//        }
//    }*/
//
//
//    //解密（数字信封）--不带签名的
//    @GetMapping("/qs/decryptP7Envelop")
//    public void decryptP7Envelop() throws TAException {
////        initDevice();
//        System.out.println("*********************************开始解密-不带签名的*********************************");
//        String keyId4 = "aly-zcjk";
//        int keyIdType4 = 0;
//        String keyAccessCode4 = "";
//        boolean isReturnCertInfo4 = true;
//        int infoType4 = 0;
//        String envelop4 = "MIIBkAYKKoEcz1UGAQQCA6CCAYAwggF8AgEAMYH5MIH2AgEAMGUwXDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEbMBkGA1UEAwwSQ0ZDQSBURVNUIFNNMiBPQ0ExAgUQUZUYMDANBgkqgRzPVQGCLQMFAAR7MHkCIQDOGo4Ycsule6KlGELzgHCDin/mPW5u8zw6PkKZPmWCnwIgWlbwQoRYYs/nVkNfMcbyAEo9wve8w/z8SwdbaHQEiLEEIJ+7a/EYo2gkprfNSpUtCMXcoLfzNWLacRA68UKfyfZoBBBlH1JUPlmoh5eLyknmUjeVMHsGCiqBHM9VBgEEAgEwGwYHKoEcz1UBaAQQQf/ku4EF+nSLsulQQeEVW4BQZQFDfL1WvPjOX+w0L9yGltNOz/01Yp80LTjtIsm0wfYRWLLk5FPeeBp+V3JCX/DX6AavEcJLnFAzAYUpPv1JIEqZNtGnXFiDiu9jHGjqfhg=";
//        DecryptP7EnvelopResponse decryptP7EnvelopResponse = signServerApi.decryptP7Envelop(keyId4, keyIdType4, keyAccessCode4, envelop4, isReturnCertInfo4, infoType4);
//        System.out.println("解密p7数字信封：" + String.format(printFormat, decryptP7EnvelopResponse.getCode(), decryptP7EnvelopResponse.getMsg(), decryptP7EnvelopResponse.toString()));
//        System.out.println("-----------------------------------解密完成-不带签名的-----------------------------------");
//    }
//
//
//    //解密（带签名的数字信封）--带签名的
//    @GetMapping("/qs/decryptP7SignedAndEnvelop")
//    public void decryptP7SignedAndEnvelop() throws TAException {
////        initDevice();
//        System.out.println("*********************************开始解密-带签名的*********************************");
//        String keyId5 = "aly-zcjk";
//        int keyIdType5 = 0;
//        String keyAccessCode5 = "";
//        String envelop5 = "MIItswYKKoEcz1UGAQQCA6CCLaMwgi2fAgEAMYH4MIH1AgEAMGUwXDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEbMBkGA1UEAwwSQ0ZDQSBURVNUIFNNMiBP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sBvwXjDAvqu2Yydgk2LpX2zuS9fCxMQgXPCRL+iIbCiZtwSdqkXSJ5Cljy7mgHoXtcAMcbp/fzVdevo9vOtEqvYuGgvYVqVFcNl96PFWX7rM+Iu6IepIjtELQ2vGrWivlasLEwRux4+j3ejuUGFuAUg3KU9Qm///cXc5uP7LHAeRl6NR1qE71j0oR0m7NQir5G9fPo0T1krGGyF6XLAApy/t3Sj5Bj0A7ejFYZFVQeNealROz7tz0S3aE+1ZAq+faw/hjP6PV8hoSRiCxKjZG8DhZf/IkmMdj3FNzTixzK";
//        String sm2UserID5= "";
//        int verifyLevel5 = 0;
//        boolean isReturnCert5 = true;
//        boolean isAttachSign5 = true;
//        int attachSignFormat5 = 0;
//        boolean isReturnCertInfo5 = true;
//        int infoType5 = 0;
//        DecryptP7SignedAndEnvelopResponse decryptP7SignedAndEnvelopResponse = signServerApi.decryptP7SignedAndEnvelop(keyId5, keyIdType5, keyAccessCode5, envelop5, sm2UserID5, verifyLevel5, isReturnCert5,
//                isAttachSign5, attachSignFormat5, isReturnCertInfo5, infoType5);
//        System.out.println("解密P7带签名数字信封 - 内部非对称解密：" + String.format(printFormat, decryptP7SignedAndEnvelopResponse.getCode(), decryptP7SignedAndEnvelopResponse.getMsg(), decryptP7SignedAndEnvelopResponse.toString()));
//        System.out.println("-----------------------------------解密完成-带签名的-----------------------------------");
//    }
//
//
//    //验签
//    @GetMapping("/qs/verifyP7Sign")
//    public void verifyP7Sign() throws TAException {
////        initDevice();
//        System.out.println("*********************************开始验签*********************************");
//        String data3 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        int dataType3 = 0;
//        String sign3 = "MIIDzwYKKoEcz1UGAQQCAqCCA78wggO7AgEBMQ4wDAYIKoEcz1UBgxEFADAMBgoqgRzPVQYBBAIBoIICvzCCArswggJeoAMCAQICBRBGMgARMAwGCCqBHM9VA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9VAYMRBQAwDQYJKoEcz1UBgi0BBQAESDBGAiEAgffVd5rmLLV4fLLrustK3DTjfMUzuV2pFR7ZoTOeNoMCIQDDCZgEo36Y+OxJx37VYvPi+/abmsXX9q2AHgljk9EFQw==";
//        boolean isDetach3 = true;
//        boolean isReturnCertInfo3 = true;
//        int infoType3 = 1;
//        VerifyP7SignResponse verifyP7SignResponse = signServerApi.verifyP7Sign(data3, dataType3, sign3, isDetach3, isReturnCertInfo3, infoType3);
//        System.out.println("验证p7签名：" + String.format(printFormat, verifyP7SignResponse.getCode(), verifyP7SignResponse.getMsg(), verifyP7SignResponse.toString()));
//        System.out.println("-----------------------------------验签完成-----------------------------------");
//    }
//
//
//    //加签
//    @GetMapping("/qs/p7Sign")
//    public void p7Sign() throws TAException {
////        initDevice();
//        String keyId0 = "aly-zcjk";
//        int keyIdType0 = 0;
//        String keyAccessCode0 = "";
//        String algorithm0 = TACryptConst.TA_S_ALG_SM3WITHSM2;
//        String data0 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        int dataType0 = 0;
//        boolean isDetach0 = true;
//        String sm2UserID0 = "";
//        boolean isReturnCertInfo0 = true;
//        int infoType0 = 1;
//        int signCertType0 = 0;
//        P7SignResponse p7SignResponse = signServerApi.p7Sign(keyId0, keyIdType0, keyAccessCode0, sm2UserID0, algorithm0, data0, dataType0, isDetach0, isReturnCertInfo0, infoType0, signCertType0);
//        System.out.println("p7签名(内部密钥)：" + String.format(printFormat, p7SignResponse.getCode(), p7SignResponse.getMsg(), p7SignResponse.toString()));
//        System.out.println("-----------------------------------加签完成-----------------------------------");
//    }
//
//    //加密
//    @GetMapping("/qs/p7EnvelopExternal")
//    public void p7EnvelopExternal() throws TAException {
////        initDevice();
//        //清算所导入服务器对应的公钥证书
//        String cert1 = "MIICuzCCAl6gAwIBAgIFEEYyABEwDAYIKoEcz1UBg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 = true;
//        int infoType1 = 0;
//        P7EnvelopExternalResponse p7EnvelopExternalResponse = signServerApi.p7EnvelopExternal(cert1, encAlgorithm1, data1, isReturnCertInfo1, infoType1);
//        System.out.println("外部证书制作p7信封：" + String.format(printFormat, p7EnvelopExternalResponse.getCode(), p7EnvelopExternalResponse.getMsg(), p7EnvelopExternalResponse.toString()));
//        System.out.println("-----------------------------------加密完成-----------------------------------");
//    }
//
//    //生成带签名的数字信封
//    @GetMapping("/qs/p7CreateSignedAndEnvelop")
//    public void p7CreateSignedAndEnvelop() throws TAException {
////        initDevice();
//        System.out.println("*********************************开始生成带签名的数字信封*********************************");
//        String signKeyId2 = "aly-zcjk";
//        int signKeyIdType2 = 0;
//        String signKeyAccessCode2 = "";
//        String signAlgorithm2 = TACryptConst.TA_S_ALG_SM3WITHSM2;
//        String encAlgorithm2 = TACryptConst.GBSMS4_CBC;
//        String data2 = "UXVlcnlDb2RlPTEyMzQ1NiZJbnRlcmZhY2VUeXBlPUFCQ0RFRkcmUXVlcnlPbGRDb2RlPea1i+ivlSZNZW1JRD1DMTAx";
//        String sm2UserID2 = "";
//        String encCert2 = "MIICuzCCAl6gAwIBAgIFEEYyABEwDAYIKoEcz1UBg3UFADBcMQswCQYDVQQGEwJDTjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRswGQYDVQQDDBJDRkNBIFRFU1QgU00yIE9DQTEwHhcNMjEwOTI2MDMwMzA4WhcNMjYwOTI2MDMwMzA4WjByMQswCQYDVQQGEwJjbjEVMBMGA1UECgwMQ0ZDQSBURVNUIENBMQ0wCwYDVQQLDARDSEZNMRkwFwYDVQQLDBBPcmdhbml6YXRpb25hbC0xMSIwIAYDVQQDDBkwNDFAMzEyMzQ1NkBjb21tQDAwMDAwMDAxMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE5WFigL8lA3su9spoX3h7HQcsGm9kfxYT4JZfbSdZ7JcMZaDZmKS1LEbA/KOdF1mPY0UN7ab/tvNhse2Tcl+FiaOB9DCB8TAfBgNVHSMEGDAWgBRr/hjaj0I6prhtsy6Igzo0osEw4TBIBgNVHSAEQTA/MD0GCGCBHIbvKgEBMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2ZjYS5jb20uY24vdXMvdXMtMTQuaHRtMDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly91Y3JsLmNmY2EuY29tLmNuL1NNMi9jcmwyNjIwMC5jcmwwCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBRI4h4qUtluyjSfoXCp/4pHuemLNTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwDAYIKoEcz1UBg3UFAANJADBGAiEA63Z9OfK4zlkJ4jSAihAwrd6FYvlU7ZUGgf2+pFO4X44CIQDdXuEeWA02js6w1L6UezvNH2hF5QV3PTK1Znylrr3mmQ==";
//        boolean isAttachSign2 = true;
//        int attachSignFormat2 = 0;
//        boolean isReturnCertInfo2 = true;
//        int infoType2 = 1;
//        P7SignedAndEnvelopResponse p7SignedAndEnvelopResponse = signServerApi.p7CreateSignedAndEnvelop(signKeyId2, signKeyIdType2, signKeyAccessCode2, signAlgorithm2, encCert2, encAlgorithm2, data2, sm2UserID2,
//                isAttachSign2, attachSignFormat2, isReturnCertInfo2, infoType2);
//        System.out.println("编制p7带签名的数字证书 - 签名使用内部密钥，加密使用外部证书：" + String.format(printFormat, p7SignedAndEnvelopResponse.getCode(), p7SignedAndEnvelopResponse.getMsg(), p7SignedAndEnvelopResponse.toString()));
//        System.out.println("*********************************生成带签名的数字信封结束*********************************");
//    }
//
//
//
//
//
//
//
//
//
//}
